package com.example.springinit2.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class MessageProcessorImpl implements MessageProcessor {

  private MessageService messageService;

  // setter based DI
  @Autowired
  @Qualifier("emailService")
  public void setMessageService( MessageService messageService) {
	this .messageService = messageService;
  }

  // constructor based DI
  //@Autowired
  //public MessageProcessorImpl ( @Qualifier ( "emailService" ) MessageService =messageServic) {
	//this .messageService = messageService;
  //}
  //
  //public void processMsg( String message) {
	//messageService.sendMsg(message);
  //}
}